package com.ftg.product.kucun.mapper;

import com.ftg.product.kucun.pojo.Chuku;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author zwl
 * Create on 2019/5/7 13:45
 * function
 */
@Mapper
public interface ChukuMapper {
    @Select("select * from chuku where cname like \"%\"#{write}\"%\"")
    List<Chuku> show(Chuku pageH);
    @Select("select * from chuku")
    List<Chuku> showall(Chuku pageH);
    @Insert("insert into chuku(cname,csum,cumt,cprice,cpeople,cadress,cdate) values(#{cname},#{csum},#{cumt},#{cprice},#{cpeople},#{cadress},#{cdate})")
    public int insert(Chuku chuku);
    @Update("update chuku set cname=#{cname},csum=#{csum},cumt=#{cumt},cprice=#{cprice},cpeople=#{cpeople},cadress=#{cadress},cdate=#{cdate} where cid=#{cid}")
    public int update(Chuku chuku);
    @Delete("delete from chuku where cid=#{cid}")
    public int delete(String cid);

}
